package com.glaivelee.firstRefactor;

import com.glaivelee.abstracts.chooseType;

/**
 * 去除样式
 * 
 * @author Glaivelee
 * 
 */
public class ClearCssAndLabel extends chooseType {
	public ClearCssAndLabel(String srcValue) {
		super(srcValue);
		dataInit();
		filterUselessWords();
	}
	
	public static void dataInit() {
		regexList.add(getHtmlLabelExpression2("p"));
		regexList.add(getHtmlLabelExpression2("div"));
		regexList.add(getHtmlLabelExpression2("table"));

//		regexList.add(getHtmlLabelExpression2("span"));
		regexList.add(getHtmlLabelExpression2("img"));
		
		regexListUnNamed.add(getHtmlLabelExpressionUnNamed("p"));
		regexListUnNamed.add(getHtmlLabelExpressionUnNamed("div"));
		regexListUnNamed.add(getHtmlLabelExpressionUnNamed("table"));

//		regexListUnNamed.add(getHtmlLabelExpressionUnNamed("span"));
		regexListUnNamed.add(getHtmlLabelExpressionUnNamed("img"));
		
//		clearList.add("<br>");
//		clearList.add("<br/>");
//		clearList.add("<br />");
		clearList.add("\r");
		clearList.add("\n");
		clearList.add("\r\n");
		clearList.add("【转】");

		pair.put("glaivelee/glaivelee", "glaivelee");
	}

	@Override
	public String exeRex() {
		return clearStyleByPattern("style=\".*?\"", "<span\\s{0,}([^>]+)>", "</span>");
	}

	public static void main(String[] args) {

	}

}
